<script setup lang="ts">
import { useForm } from '#/hooks/useForm';

const [MyForm] = useForm({
  schema: [
    {
      component: 'Input',
      componentProps: { placeholder: '请输入用户名' },
      label: '用户名',
      fieldName: 'username',
    },
    {
      component: 'InputPassword',
      componentProps: { placeholder: '请输入密码' },
      label: '密码',
      fieldName: 'password',
    },
  ],
});
function onSubmit(value: any) {
  console.log('onSubmit', value);
}
</script>
<template>
  <h1>一切正常</h1>
  <MyForm @submit="onSubmit" />
</template>
